import 'package:gold/generated/json/base/json_convert_content.dart';
import 'package:gold/model/recover_cancel_reason_model.dart';

RecoverCancelReasonModel $RecoverCancelReasonModelFromJson(Map<String, dynamic> json) {
  final RecoverCancelReasonModel recoverCancelReasonModel = RecoverCancelReasonModel();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    recoverCancelReasonModel.id = id;
  }
  final String? value = jsonConvert.convert<String>(json['value']);
  if (value != null) {
    recoverCancelReasonModel.value = value;
  }
  return recoverCancelReasonModel;
}

Map<String, dynamic> $RecoverCancelReasonModelToJson(RecoverCancelReasonModel entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['value'] = entity.value;
  return data;
}

extension RecoverCancelReasonModelExtension on RecoverCancelReasonModel {
  RecoverCancelReasonModel copyWith({
    int? id,
    String? value,
  }) {
    return RecoverCancelReasonModel()
      ..id = id ?? this.id
      ..value = value ?? this.value;
  }
}